package com.put.mybills.activities;

import java.io.File;

import com.put.mybills.R;
import com.put.mybills.adapter.GlobalParams;



import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.util.Log;

public class SettingsFragment extends PreferenceFragment {
	
	public SettingsFragment() {}
	
	public static final SettingsFragment newInstance()
	{
		SettingsFragment f = new SettingsFragment();	   
	    return f;
	}

	 @Override
	 public void onCreate(Bundle savedInstanceState) {
		
		 super.onCreate(savedInstanceState);
		 addPreferencesFromResource(R.xml.settings);
		 
		 SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());   
		
		 
		 SharedPreferences.OnSharedPreferenceChangeListener spChanged = new
                 SharedPreferences.OnSharedPreferenceChangeListener() {

					@Override
					public void onSharedPreferenceChanged(
							SharedPreferences sharedPreferences, String key) {
						Log.d("SettingsFragment","Key = " + key );
											
					}
		 };
		 
		 sharedPref.registerOnSharedPreferenceChangeListener(spChanged);
		 
         
	}

}
